/**
 * 教学计划管理
 */

import request from "@/utils/request.js";

// 专业选择下拉列表
export function majorlistOfDropApi(data) {
  return request({
    url: "/edu/major/majorlistOfDrop-down",
    method: "POST",
    params: data,
  });
}

// 学院管理导航树
export function colleageTreeDataApi() {
  return request({
    url: "/edu/colleage/colleageTreeData",
    method: "POST",
  });
}

// 根据条件查询专业列表
export function majorListApi(data) {
  return request({
    url: "/edu/major/list",
    method: "post",
    params: data,
  });
}

// 新增教学计划
export function basicManagementAddApi(data) {
  return request({
    url: "/edu/basicManagement/plan/add",
    method: "POST",
    params: data,
  });
}

// 根据条件筛选教学计划列表
export function basicManagementListApi(data) {
  return request({
    url: "/edu/basicManagement/plan/list",
    method: "POST",
    params: data,
  });
}

// 删除
export function basicManagementRemoveApi(data) {
  return request({
    url: "/edu/basicManagement/plan/remove",
    method: "POST",
    params: data,
  });
}

// 批量发布
export function batchReleaseApi(data) {
  return request({
    url: "/edu/basicManagement/plan/batchPublish",
    method: "POST",
    params: data,
  });
}

// 计划课程
export function teachingPlanCourseApi(data) {
  return request({
    url: "/edu/basicManagement/teachingPlanCourse/list2",
    method: "POST",
    params: data,
  });
}

// 修改
export function editTeachingPlanApi(data) {
  return request({
    url: "/edu/basicManagement/plan/edit",
    method: "POST",
    params: data,
  });
}

// 导出
export function teachingPlanExportApi(data) {
  return request({
    url: "/edu/basicManagement/plan/export",
    method: "POST",
    responseType: 'blob',
    params: data,
  });
}

// 查询学年学期列表
export function getSchoolYearApi(data) {
  return request({
    url: "/edu/schoolYearSemester/list",
    method: "POST",
    params: data,
  })
}

// 获取班级列表
export function getClassGradeListApi(params) {
  return request({
    url: '/edu/class/list',
    method: 'POST',
    params
  })
}

// 获取课程列表
export function getCourseListApi(params) {
  return request({
    url: '/edu/course/list',
    method: 'POST',
    params
  })
}


// 教师列表
export function getTeacherListDataApi(data) {
  return request({
    url: '/edu/teacher/list',
    method: 'POST',
    params: data
  })
}

// 年级列表
export function getGradeListApi(data) {
  return request({
    url: '/edu/typeData/list',
    method: 'POST',
    params: data
  })
}

// 计划课程新增
export function addTeachingPlanCourseApi(data) {
  return request({
    url: '/edu/basicManagement/teachingPlanCourse/batchAdd',
    method: 'POST',
    params: data
  })
}

// 获取学年学期
export function schoolYearItemApi(data) {
  return request({
    url: "/edu/schoolSemester/list",
    method: "post",
    params: data,
  });
}

// 导入
export function ImportExaminationRoomApi(data) {
  return request({ 
    ContentType: 'multipart/form-data',
    url: "/edu/basicManagement/plan/importData",
    method: 'POST', 
    params:data
  })
}
